<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Mr.Cai
  Date: 2021/3/1
  Time: 15:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/layui/css/layui.css"  media="all">
    <script type="application/javascript " src="/layui/jquery-3.4.1.min.js"></script>
</head>
<body>

<table style="width: 90%;margin: 5px auto"  class="layui-table">
    <tr>
        <td>用户编号</td>
        <td>用户名/电话号</td>
        <td>密码</td>
        <td>电子邮箱</td>
        <td>邀请码</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${users}" var="u">
        <tr>
            <td>${u.id}</td>
            <td>${u.tel}</td>
            <td>${u.password}</td>
            <td>${u.email}</td>
            <td>${u.invitation}</td>
            <td>
                <a href="/user/selectOne?id=${u.id}">修改</a>
                <a href="/user/delUser?id=${u.id}"  class="myDelete">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
<script>
    function reDelete(){
        if (!confirm("确定删除该用户？")){
            $(".myDelete").attr("href","")
        }
    }
</script>
</body>
</html>
